<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../js/jquery-3.3.1.js"></script>
</head>
<body>
<h1>JSONP测试</h1>
<script type="text/javascript">
	function foo(data){
		console.log(data);
	}
</script>
<script type="text/javascript">
$(function(){
	$.ajax({
		 type: "get",
         async:true,
         url: "http://localhost:8080/register_ssm2/jsonp.action",
         dataType: "jsonp",
         jsonp: "callback",//指定参数名称，默认为callback  
         jsonpCallback:"foo",//指定调用的回调函数名称
         /* success:function(data){
        	 foo(data);
         } */
	});
});
</script>
</body>
</html>